<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>人脸设备</title>
    <link href="../lib/layui/css/layui.css" rel="stylesheet" type="text/css" media="screen" />
    <script src="../lib/jquery-3.3.1.min.js" type="text/javascript" ></script>
    <script src="../lib/layui/layui.js" type="text/javascript" ></script>
    <script src="../js/cdfaceacs/acsDeviceMgr.js" type="text/javascript" ></script>
    <script type="text/html" id="barOperate">
        <a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="edit">编辑</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</a>
        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="open">开门</a>
        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="setPassword">设置密码</a>
    </script>
</head>
<body style="background-color:white;">
<div id="uploadDiv" style="display: none">
    <form class="layui-form" lay-filter="resource_form" id="resource_form" style="margin-top:5%">
        <input style="display: none" id="id" name="id">
        <div class="layui-form-item">
            <label class="layui-form-label">设备别名:</label>
            <div class="layui-input-inline">
                <input class="layui-input" name="deviceName" id="deviceName" autocomplete="off" lay-verify="required"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">进出方向:</label>
            <div class="layui-input-inline">
                <input class="layui-input" name="deviceArea" id="deviceArea" autocomplete="off" lay-verify="required"/>
            </div>
        </div>
        <div class='layui-input-block' style="margin-top: 20px;margin-left: 27%">
            <button class="layui-btn" id="upload_form" lay-submit="" lay-filter="upload_form">提交</button>
            <button class="layui-btn"  id="cancel_form">取消</button>
        </div>
    </form>
</div>

<div id="setPasswordDiv" style="display: none">
    <form class="layui-form" lay-filter="setPasswordForm" id="setPasswordForm" style="margin-top:5%">
        <input style="display: none" id="setPasswordId" name="id">
        <div class="layui-form-item">
            <label class="layui-form-label">密码:</label>
            <div class="layui-input-inline">
                <input type="password" class="layui-input" name="password" id="password" autocomplete="off" lay-verify="required"/>
            </div>
        </div>
        <div class='layui-input-block' style="margin-top: 20px;margin-left: 27%">
            <button class="layui-btn" id="setPassword" lay-submit="" lay-filter="setPassword">提交</button>
            <button class="layui-btn"  id="cancelSetPassword">取消</button>
        </div>
    </form>
</div>

<div>
    <form class="layui-form" lay-filter="serch_form">
        <div class="layui-input-inline" >
            <input id="name" class="layui-input" autocomplete="off" placeholder="请输入设备别名/IP/区域">
        </div>
        <div class="layui-input-inline">
            <button class="layui-btn" lay-submit="" lay-filter="query_device" >查询</button>
            <button class="layui-btn" type="button" id="syncDevice" >同步设备</button>
            <button class="layui-btn"  type="button" onclick="reload()">重置</button>
        </div>
    </form>
    <table id="deviceTable" lay-filter="deviceTable">
    </table>
</div>

</body>
</html>